﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using prototype123.controllers;
using prototype123.models;

namespace prototype123.data_access
{
    class AssignmentDAO
    {
        private SqlConnection db_connection; // = new SqlConnection("Data Source=sparky;Initial Catalog=cps420_team2_dev;Persist Security Info=True;User ID=cps420team2;Password=team2");

        public AssignmentDAO(SqlConnection connection)
        {
            db_connection = connection;
        }


        public void AddAssignment(Assignment asm, int stuid, int catid)
        {
            //sql command insert into assignment an entry using asm, stuid,a nd catid. ok?

            //execute command            
        }

        public void DeleteAssignment(Assignment asm, int catid, string title)
        {
            //sql command delete from assignment where a match exists with catid, title, and maybe others

            //execute command
        }

        public void UpdateAssignment(Assignment newasm, Assignment oldasm)
        {
            //sql command insert into assignment where match exists with oldasm, insert values from newasm

            //execute command
        }


    }
}
